﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UsersListGrid.ascx.cs" Inherits="CarRental.Control.User.UsersListGrid" %>

    <asp:GridView runat="server" ID="UsersGridView" AutoGenerateColumns="false" OnRowEditing="UsersGridViewEditEventHandler" OnRowUpdating="UsersGridViewUpdateEventHandler" OnRowCancelingEdit="UsersGridViewCancelEditEventHandler" OnRowDeleting="UsersGridViewDeleteEventHandler">
        <Columns>
          <asp:BoundField HeaderText="ID" DataField="Id" ReadOnly="true"></asp:BoundField>
          <asp:BoundField HeaderText="Login" DataField="UserName"></asp:BoundField>
          <asp:BoundField HeaderText="Płeć" DataField="Gender" />
          <asp:TemplateField HeaderText="Aktywny">
            <EditItemTemplate>
                <asp:CheckBox ID="CheckBoxIsActive" runat="server" Checked='<%# Bind("IsActive") %>'></asp:CheckBox>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:CheckBox ID="CheckBoxIsActive" runat="server" Checked='<%# Bind("IsActive") %>' Enabled="false"></asp:CheckBox>
            </ItemTemplate>
          </asp:TemplateField>
          <asp:BoundField HeaderText="Data rejestracji" DataField="RegisterDate" DataFormatString="{0:dd-MM-yyyy}" ReadOnly="true"></asp:BoundField>
          <asp:CommandField ShowEditButton="True" ShowDeleteButton="True" EditText="Edytuj" CancelText="Anuluj" UpdateText="Zapisz" DeleteText="Usuń"></asp:CommandField>
        </Columns>
    </asp:GridView>
    

